<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <h2>{{message}}</h2>
  <label for="male">
    <input type="radio" value="男" id="male" v-model="sex">男
  </label>
  <label for="female">
    <input type="radio" value="女" id="female" v-model="sex">女
  </label>
  <!--多个v-model绑定同一个变量时，可以不用name值-->
  <h2>性别为：{{sex}}</h2>
</div>

<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      message: 'hi',
      //直接设置有无默认值
      sex:'女'
    },
    computed: {

    },
    methods: {

    }
  })

</script>
</body>
</html>